<?php
/**
 * Created by PhpStorm.
 * User: cc
 * Date: 2022/9/26
 * Time: 3:05 PM
 */

namespace app\common\cachemodel;

use app\common\model\BaseCache;
use think\Log;

class AsoCheckLog extends BaseCache
{
    protected $table = 'wechatadmin.aso_check_log';

    public function saveData($idfa, $status)
    {
        try
        {
            $id = $this->insertData(['idfa' => $idfa, 'status' => $status, 'create_time' => time()]);
        }
        catch (\Exception $e)
        {
            Log::write("ASO排重日志写入失败:{$idfa},文件信息:{$e->getFile()} : {$e->getLine()}", 'error', true);
            return 0;
        }

        return $id;
    }
}
